Integrand size = 21, antiderivative size = 127 \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {a \left (2 a^2-3 b^2\right ) x}{2 b^4}+\frac {2 \left (a^2-b^2\right )^{3/2} \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^4 d}+\frac {\cos ^3(c+d x)}{3 b d}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^3 d} \]
-1/2*a*(2*a^2-3*b^2)*x/b^4+2*(a^2-b^2)^(3/2)*arctan((b+a*tan(1/2*d*x+1/2*c ))/(a^2-b^2)^(1/2))/b^4/d+1/3*cos(d*x+c)^3/b/d-1/2*cos(d*x+c)*(2*a^2-2*b^2 -a*b*sin(d*x+c))/b^3/d
Leaf count is larger than twice the leaf count of optimal. \(428\) vs. \(2(127)=254\).
Time = 3.17 (sec) , antiderivative size = 428, normalized size of antiderivative = 3.37 \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\cos ^3(c+d x) \left (12 (a-b)^2 (a+b) \text {arctanh}\left (\frac {\sqrt {a-b} \sqrt {-\frac {b (1+\sin (c+d x))}{a-b}}}{\sqrt {a+b} \sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}}}\right ) \sqrt {1-\sin (c+d x)}+\sqrt {a+b} \left (-12 \sqrt {a-b} \left (a^2-b^2\right ) \text {arctanh}\left (\frac {\sqrt {\frac {b (1+\sin (c+d x))}{-a+b}}}{\sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}}}\right ) \sqrt {1-\sin (c+d x)}+\sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}} \left (-6 \sqrt {b} \left (-2 a^2+a b+2 b^2\right ) \text {arcsinh}\left (\frac {\sqrt {a-b} \sqrt {-\frac {b (1+\sin (c+d x))}{a-b}}}{\sqrt {2} \sqrt {b}}\right )+\sqrt {a-b} \sqrt {1-\sin (c+d x)} \sqrt {\frac {b (1+\sin (c+d x))}{-a+b}} \left (6 a^2-8 b^2-3 a b \sin (c+d x)+2 b^2 \sin ^2(c+d x)\right )\right )\right )\right )}{6 (a-b)^{3/2} b^2 \sqrt {a+b} d (1-\sin (c+d x))^{3/2} \sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}} \left (-\frac {b (1+\sin (c+d x))}{a-b}\right )^{3/2}} \]
(Cos[c + d*x]^3*(12*(a - b)^2*(a + b)*ArcTanh[(Sqrt[a - b]*Sqrt[-((b*(1 + Sin[c + d*x]))/(a - b))])/(Sqrt[a + b]*Sqrt[-((b*(-1 + Sin[c + d*x]))/(a + b))])]*Sqrt[1 - Sin[c + d*x]] + Sqrt[a + b]*(-12*Sqrt[a - b]*(a^2 - b^2)* ArcTanh[Sqrt[(b*(1 + Sin[c + d*x]))/(-a + b)]/Sqrt[-((b*(-1 + Sin[c + d*x] ))/(a + b))]]*Sqrt[1 - Sin[c + d*x]] + Sqrt[-((b*(-1 + Sin[c + d*x]))/(a + b))]*(-6*Sqrt[b]*(-2*a^2 + a*b + 2*b^2)*ArcSinh[(Sqrt[a - b]*Sqrt[-((b*(1 + Sin[c + d*x]))/(a - b))])/(Sqrt[2]*Sqrt[b])] + Sqrt[a - b]*Sqrt[1 - Sin [c + d*x]]*Sqrt[(b*(1 + Sin[c + d*x]))/(-a + b)]*(6*a^2 - 8*b^2 - 3*a*b*Si n[c + d*x] + 2*b^2*Sin[c + d*x]^2)))))/(6*(a - b)^(3/2)*b^2*Sqrt[a + b]*d* (1 - Sin[c + d*x])^(3/2)*Sqrt[-((b*(-1 + Sin[c + d*x]))/(a + b))]*(-((b*(1 + Sin[c + d*x]))/(a - b)))^(3/2))
Time = 0.68 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.13, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3174, 3042, 3344, 25, 3042, 3214, 3042, 3139, 1083, 217}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^4}{a+b \sin (c+d x)}dx\) |
\(\Big \downarrow \) 3174 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) (b+a \sin (c+d x))}{a+b \sin (c+d x)}dx}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\cos (c+d x)^2 (b+a \sin (c+d x))}{a+b \sin (c+d x)}dx}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3344 |
\(\displaystyle \frac {\frac {\int -\frac {b \left (a^2-2 b^2\right )+a \left (2 a^2-3 b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {\int \frac {b \left (a^2-2 b^2\right )+a \left (2 a^2-3 b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\int \frac {b \left (a^2-2 b^2\right )+a \left (2 a^2-3 b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {-\frac {\frac {a x \left (2 a^2-3 b^2\right )}{b}-\frac {2 \left (a^2-b^2\right )^2 \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\frac {a x \left (2 a^2-3 b^2\right )}{b}-\frac {2 \left (a^2-b^2\right )^2 \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {-\frac {\frac {a x \left (2 a^2-3 b^2\right )}{b}-\frac {4 \left (a^2-b^2\right )^2 \int \frac {1}{a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d}}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {-\frac {\frac {8 \left (a^2-b^2\right )^2 \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d}+\frac {a x \left (2 a^2-3 b^2\right )}{b}}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {-\frac {\frac {a x \left (2 a^2-3 b^2\right )}{b}-\frac {4 \left (a^2-b^2\right )^{3/2} \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b d}}{2 b^2}-\frac {\cos (c+d x) \left (2 \left (a^2-b^2\right )-a b \sin (c+d x)\right )}{2 b^2 d}}{b}+\frac {\cos ^3(c+d x)}{3 b d}\) |
Cos[c + d*x]^3/(3*b*d) + (-1/2*((a*(2*a^2 - 3*b^2)*x)/b - (4*(a^2 - b^2)^( 3/2)*ArcTan[(2*b + 2*a*Tan[(c + d*x)/2])/(2*Sqrt[a^2 - b^2])])/(b*d))/b^2 - (Cos[c + d*x]*(2*(a^2 - b^2) - a*b*Sin[c + d*x]))/(2*b^2*d))/b
3.5.32.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + p))), x] + Simp[g^2*((p - 1)/(b*(m + p))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^m*(b + a*Sin[e + f*x]), x], x] /; F reeQ[{a, b, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[p, 1] && NeQ[m + p, 0] && IntegersQ[2*m, 2*p]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*(g* Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*((b*c*(m + p + 1) - a*d* p + b*d*(m + p)*Sin[e + f*x])/(b^2*f*(m + p)*(m + p + 1))), x] + Simp[g^2*( (p - 1)/(b^2*(m + p)*(m + p + 1))) Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Si n[e + f*x])^m*Simp[b*(a*d*m + b*c*(m + p + 1)) + (a*b*c*(m + p + 1) - d*(a^ 2*p - b^2*(m + p)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[p, 1] && NeQ[m + p, 0] && NeQ[m + p + 1 , 0] && IntegerQ[2*m]
Time = 0.90 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.60
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{4} \sqrt {a^{2}-b^{2}}}-\frac {2 \left (\frac {\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}}{2}+\left (a^{2} b -2 b^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2 a^{2} b -2 b^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a \,b^{2}}{2}+a^{2} b -\frac {4 b^{3}}{3}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{b^{4}}}{d}\) | \(203\) |
default | \(\frac {\frac {2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{4} \sqrt {a^{2}-b^{2}}}-\frac {2 \left (\frac {\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}}{2}+\left (a^{2} b -2 b^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2 a^{2} b -2 b^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a \,b^{2}}{2}+a^{2} b -\frac {4 b^{3}}{3}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{b^{4}}}{d}\) | \(203\) |
risch | \(-\frac {a^{3} x}{b^{4}}+\frac {3 a x}{2 b^{2}}-\frac {{\mathrm e}^{i \left (d x +c \right )} a^{2}}{2 b^{3} d}+\frac {5 \,{\mathrm e}^{i \left (d x +c \right )}}{8 b d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a^{2}}{2 b^{3} d}+\frac {5 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 b d}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right ) a^{2}}{d \,b^{4}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right ) a^{2}}{d \,b^{4}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{2}}+\frac {\cos \left (3 d x +3 c \right )}{12 b d}+\frac {a \sin \left (2 d x +2 c \right )}{4 b^{2} d}\) | \(333\) |
1/d*(2*(a^4-2*a^2*b^2+b^4)/b^4/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x +1/2*c)+2*b)/(a^2-b^2)^(1/2))-2/b^4*((1/2*tan(1/2*d*x+1/2*c)^5*a*b^2+(a^2* b-2*b^3)*tan(1/2*d*x+1/2*c)^4+(2*a^2*b-2*b^3)*tan(1/2*d*x+1/2*c)^2-1/2*tan (1/2*d*x+1/2*c)*a*b^2+a^2*b-4/3*b^3)/(1+tan(1/2*d*x+1/2*c)^2)^3+1/2*a*(2*a ^2-3*b^2)*arctan(tan(1/2*d*x+1/2*c))))
Time = 0.29 (sec) , antiderivative size = 332, normalized size of antiderivative = 2.61 \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\left [\frac {2 \, b^{3} \cos \left (d x + c\right )^{3} + 3 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} d x - 3 \, {\left (a^{2} - b^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right ) - 6 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )}{6 \, b^{4} d}, \frac {2 \, b^{3} \cos \left (d x + c\right )^{3} + 3 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} d x - 6 \, {\left (a^{2} - b^{2}\right )}^{\frac {3}{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right ) - 6 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )}{6 \, b^{4} d}\right ] \]
[1/6*(2*b^3*cos(d*x + c)^3 + 3*a*b^2*cos(d*x + c)*sin(d*x + c) - 3*(2*a^3 - 3*a*b^2)*d*x - 3*(a^2 - b^2)*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)) - 6*(a^2*b - b^3)*cos(d*x + c))/(b^4*d), 1/6*(2*b^3*cos(d *x + c)^3 + 3*a*b^2*cos(d*x + c)*sin(d*x + c) - 3*(2*a^3 - 3*a*b^2)*d*x - 6*(a^2 - b^2)^(3/2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c))) - 6*(a^2*b - b^3)*cos(d*x + c))/(b^4*d)]
Timed out. \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.51 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.78 \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\frac {3 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} {\left (d x + c\right )}}{b^{4}} - \frac {12 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} b^{4}} + \frac {2 \, {\left (3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 12 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a^{2} - 8 \, b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} b^{3}}}{6 \, d} \]
-1/6*(3*(2*a^3 - 3*a*b^2)*(d*x + c)/b^4 - 12*(a^4 - 2*a^2*b^2 + b^4)*(pi*f loor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/ sqrt(a^2 - b^2)))/(sqrt(a^2 - b^2)*b^4) + 2*(3*a*b*tan(1/2*d*x + 1/2*c)^5 + 6*a^2*tan(1/2*d*x + 1/2*c)^4 - 12*b^2*tan(1/2*d*x + 1/2*c)^4 + 12*a^2*ta n(1/2*d*x + 1/2*c)^2 - 12*b^2*tan(1/2*d*x + 1/2*c)^2 - 3*a*b*tan(1/2*d*x + 1/2*c) + 6*a^2 - 8*b^2)/((tan(1/2*d*x + 1/2*c)^2 + 1)^3*b^3))/d
Time = 5.70 (sec) , antiderivative size = 364, normalized size of antiderivative = 2.87 \[ \int \frac {\cos ^4(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {5\,\cos \left (c+d\,x\right )}{4}+\frac {\cos \left (3\,c+3\,d\,x\right )}{12}}{b\,d}+\frac {3\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+\frac {a\,\sin \left (2\,c+2\,d\,x\right )}{4}}{b^2\,d}-\frac {a^2\,\cos \left (c+d\,x\right )}{b^3\,d}-\frac {2\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{b^4\,d}+\frac {2\,\mathrm {atanh}\left (\frac {2\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}-a^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}+a\,b\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^5+2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b-2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b^2-4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^3+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^4+2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^5}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4\,d} \]
((5*cos(c + d*x))/4 + cos(3*c + 3*d*x)/12)/(b*d) + (3*a*atan(sin(c/2 + (d* x)/2)/cos(c/2 + (d*x)/2)) + (a*sin(2*c + 2*d*x))/4)/(b^2*d) - (a^2*cos(c + d*x))/(b^3*d) - (2*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(b^4* d) + (2*atanh((2*b^2*sin(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2 )^(1/2) - a^2*sin(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2) + a*b*cos(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2))/(a^5* cos(c/2 + (d*x)/2) + 2*b^5*sin(c/2 + (d*x)/2) + a*b^4*cos(c/2 + (d*x)/2) + 2*a^4*b*sin(c/2 + (d*x)/2) - 2*a^3*b^2*cos(c/2 + (d*x)/2) - 4*a^2*b^3*sin (c/2 + (d*x)/2)))*(-(a + b)^3*(a - b)^3)^(1/2))/(b^4*d)